/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.wlyy.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.yihu.wlyy.entity.follow.FollowUpPlanStageItemQuestion;

public interface FollowUpPlanStageItemQuestionDao extends PagingAndSortingRepository<FollowUpPlanStageItemQuestion, Long>, JpaSpecificationExecutor<FollowUpPlanStageItemQuestion> {
	
	List<FollowUpPlanStageItemQuestion> findByItem(String item);

	@Query("select a from FollowUpPlanStageItemQuestion a where a.item = ?1")
	List<FollowUpPlanStageItemQuestion> findByItemCode(String itemCode);

	@Query("select a from FollowUpPlanStageItemQuestion a where a.code = ?1")
	List<FollowUpPlanStageItemQuestion> findByCode(String question);
}
